package com.itheima.service.impl;

import com.itheima.mapper.UserMapper;
import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Encounter
 * @date 2024/10/15 16:19<br/>
 */
@Service
public class UserServiceImpl implements UserService
    {
        @Autowired
        private UserMapper userMapper;
        
        /**
         * 按用户名加载用户
         *
         * @param username 用户名
         * @return {@link User }
         */
        @Override
        public User loadUserByUsername(String username)
            {
                return userMapper.loadUserByUsername(username);
            }
        
        /**
         * 获取身份验证列表
         *
         * @param username 用户名
         * @return {@link List }<{@link String }>
         */
        @Override
        public List<String> getAuthList(String username)
            {
                return userMapper.getAuthList(username);
            }
    }
